<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title>CREATE RESTAURANT</title>
<link rel="stylesheet" href="../../css/bootstrap/bootstrap.css"
	th:href="@{/css/bootstrap/bootstrap.css}" />
<style>
@font-face {
	font-family: 'Glyphicons Halflings';
	src: url('../fonts/glyphicons-halflings-regular.eot');
	src: url('../fonts/glyphicons-halflings-regular.eot?#iefix')
		format('embedded-opentype'),
		url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
		url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),
		url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular')
		format('svg');
}
}
</style>
</head>
<body>
	<header></header>
	<nav class="navbar navbar-inverse">
		<div class="container-fluid">
			<div class="col-md-offset-1">
				<ul class="nav navbar-nav">
					<li><a><span></span>HOME</a></li>
					<li><a href="#"><span></span>RESTAURANT</a></li>
					<li><a th:href="@{/admin/list}"><span></span>ADMIN</a></li>
					<li><a href="#"><span></span>ORDER</a></li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li><a href="#"><span class="glyphicon glyphicon-search"></span>Sign
							Up</a></li>
					<li><a th:href="@{/j_spring_security_logout}"><span class="glyphicon glyphicon-log-out"></span>Logout</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<section>
		<article class="container col-sm-10 col-sm-offset-1">
			<ol class="breadcrumb">
				<li><a th:href="@{/adminaccount/home}">Home</a></li>
				<li><a th:href="@{/restaurant/list}">Restaurant</a></li>
				<li class="active">Search</li>
			</ol>
			<div class="panel panel-success">
				<div class="panel-heading">RESTAURANT MANAGEMENT</div>
				<div class="panel-body">
					<form method="post" th:action="@{/restaurant/search}"
						class="form-horizontal container col-sm-10 col-sm-offset-1">
						<div class="form-group">
							<label class="control-label col-sm-3" for="restaurantName">Restaurant
								Name:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="restaurantName"
									name="restaurantName" th:value="${objSearch.restaurantName}"
									placeholder="Enter restaurant name" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="restaurantTitle">Restaurant
								Title:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="restaurantTitle"
									name="restaurantTitle" th:value="${objSearch.restaurantTitle}"
									placeholder="Enter restaurant title" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="wardName">Ward
								Name:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="wardName"
									name="wardName"
									th:value="${objSearch.wardName}"
									placeholder="Enter ward name" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="openTime">Open/
								Close Time:</label>
							<div class="col-sm-3">
								<input type="time" class="form-control" id="openTime"
									name="openTime" th:value="${objSearch.openTime}" />
							</div>
							<div class="col-sm-offset-1 col-sm-3">
								<input type="time" class="form-control" id="closeTime"
									name="closeTime" th:value="closeTime" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="deliveryPrice">Delivery
								Price:</label>
							<div class="col-sm-9">
								<input type="number" class="form-control" id="deliveryPrice"
									name="deliveryPrice" th:value="${objSearch.deliveryPrice}"
									placeholder="Enter delivery price" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="minOrder">Minimum
								Bill:</label>
							<div class="col-sm-9">
								<input type="number" class="form-control" id="minOrder"
									name="minOrder" th:value="${objSearch.minOrder}"
									placeholder="Enter minimum bill" />
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-3">
								<button type="submit"
									class="btn btn-primary glyphicon glyphicon-search">Search</button>
							</div>
							<div class="sm-offset-3 col-sm-3 pull-right">
								<button type="button"
									onclick="location.href='/core-web-admin/restaurant/form'"
									class="btn btn-primary glyphicon glyphicon-new-window">Add</button>
							</div>
						</div>
					</form>
					<div th:unless="${#lists.isEmpty(list)}">
						<table class="table table-hover">
							<thead>
								<tr>
									<th>Restaurant Name</th>
									<th>Restaurant Title</th>
									<th>Ward Name</th>
									<th>Open Time</th>
									<th>Close Time</th>
									<th>Delivery Price</th>
									<th>Minimum Bill</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="res : ${list}">
									<td><a
										th:href="@{/restaurant/detail(restaurantId=${res.restaurantId})}"
										th:text="${res.restaurantName}"></a></td>
									<td th:text="${res.restaurantTitle}"></td>
									<td th:text="${res.wardName}"></td>
									<td th:text="${res.openTime}"></td>
									<td th:text="${res.closeTime}"></td>
									<td th:text="${res.deliveryPrice}"></td>
									<td th:text="${res.minOrder}"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="panel-footer"></div>
			</div>
		</article>
	</section>
	<footer class="container col-sm-12">
		<ol class="breadcrumb text-center">
			<li class="active"><p>@copyright - University Of Information
					Technology - Spring + hibernate + css3 + html5</p></li>
		</ol>
	</footer>
</body>
</html>